{
  "guild": {
    "id": "1361349522684510449",
    "name": "wafer.space Community",
    "iconUrl": "2026-09_media/fb143eaa45770cbb40493d09b625e98b-09FD1.png"
  },
  "channel": {
    "id": "1554294587420319839",
    "type": "GuildPublicThread",
    "categoryId": "1408135265427394661",
    "category": "\uD83D\uDD70️-analog",
    "name": "Magic is confusing to me, like, _very._",
    "topic": null
  },
  "dateRange": {
    "after": "2026-08-31T23:59:59.999+00:00",
    "before": "2026-10-01T00:00:00+00:00"
  },
  "exportedAt": "2026-09-30T21:20:28.124513+00:00",
  "messages": [
    {
      "id": "1554295800429940880",
      "type": "21",
      "timestamp": "2026-09-29T00:56:36.242+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "",
      "author": {
        "id": "738396032295108721",
        "name": "bailey8889",
        "discriminator": "0000",
        "nickname": "bailey",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/0-EB806.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [
        {
          "id": "262706220073222144",
          "name": "namibj",
          "discriminator": "0000",
          "nickname": "namibj",
          "color": null,
          "isBot": false,
          "roles": [],
          "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
        }
      ],
      "reference": {
        "messageId": "1554294587420319839",
        "channelId": "1408135265427394661",
        "guildId": "1361349522684510449"
      },
      "inlineEmojis": []
    },
    {
      "id": "1554295803881726043",
      "type": "Default",
      "timestamp": "2026-09-29T00:56:37.065+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Definitely aware of the confusion around magic. It's based on many different paradigms. \n\nSo are you using kpex or some other flow? Are you required to flatten the layout in klayout before running the extraction?",
      "author": {
        "id": "738396032295108721",
        "name": "bailey8889",
        "discriminator": "0000",
        "nickname": "bailey",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/0-EB806.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554295899537146017",
      "type": "Default",
      "timestamp": "2026-09-29T00:56:59.871+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "No, see the script above",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554295995238453349",
      "type": "Default",
      "timestamp": "2026-09-29T00:57:22.688+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "I notably don't want to wait further HOURS for magic to extract at multiple hierarchy levels",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554304676999200893",
      "type": "Default",
      "timestamp": "2026-09-29T01:31:52.581+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Ok, the `extract_spice_simplified.py` file, right?\n\nI think these commands will yield a flattened parasitic extracted netlist with a hierarchical layout as input.\nIt also turns off some of the backup processing that may speed things up. The `short resistor` directives adds a 0Ω resistor between shorted ports instead of dropping them. And the `feedback save` will save any extraction anomalies (text problems, etc.).\n\n```\n        magic_commands = [\n            \"drc off\",\n            \"gds drccheck off\",\n            \"undo disable\",\n            \"locking disable\",\n            \"crashbackups stop\",\n            f\"gds read {tcl_brace(temp_gds)}\",\n            f\"load {tcl_brace(top_cell)}\",\n            \"select top cell\",\n            \"port makeall\",\n            \"expand\",\n            f\"flatten {tcl_brace(top_cell)}_flat\",\n            f\"load {tcl_brace(top_cell)}_flat\",\n            f\"cellname delete {tcl_brace(top_cell)}\",\n            f\"cellname rename {tcl_brace(top_cell)}_flat {tcl_brace(top_cell)}\",\n            \"select top cell\",\n            \"ext2spice lvs\",\n            \"ext2spice rthresh 0\",\n            \"ext2spice merge conservative\"\n            \"ext2spice short resistor\"\n            \"extresist simplify on\",\n            \"extresist minres 100\",\n            \"extresist threshold 1000\",\n            \"extract do resistance\",\n            \"extract all\",\n            \"ext2spice extresist on\",\n            \"ext2spice resistor tee on\",\n            \"feedback save {tcl_brace(top_cell)}.pex.feedback.txt\",\n        ]\n```\n\nHaven't tested, just added some of the commands from my scripts and Tim's comments.",
      "author": {
        "id": "738396032295108721",
        "name": "bailey8889",
        "discriminator": "0000",
        "nickname": "bailey",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/0-EB806.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554319955284201473",
      "type": "Default",
      "timestamp": "2026-09-29T02:32:35.208+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "hmmmm will try later, it's a hot day I need to get to sleep sooner than later",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [
        {
          "emoji": {
            "id": "",
            "name": "\uD83D\uDC4D",
            "code": "thumbsup",
            "isAnimated": false,
            "imageUrl": "2026-09_media/1f44d-27259.svg"
          },
          "count": 1,
          "users": [
            {
              "id": "738396032295108721",
              "name": "bailey8889",
              "discriminator": "0000",
              "nickname": "bailey",
              "color": null,
              "isBot": false,
              "avatarUrl": "2026-09_media/0-EB806.png"
            }
          ]
        }
      ],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554668233250832437",
      "type": "Reply",
      "timestamp": "2026-09-30T01:36:31.146+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "OK, so, what I would enjoy is hierachical LVS but global/flattened PEX.\nYes, including as needed 0-ohm's to maintain appropriate local naming of nets. And eliding those 0-ohm's where that'll not create conflicts, i.e., just propagating such a name beyond to what would have been auto-named instead.",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [
        {
          "id": "738396032295108721",
          "name": "bailey8889",
          "discriminator": "0000",
          "nickname": "bailey",
          "color": null,
          "isBot": false,
          "roles": [],
          "avatarUrl": "2026-09_media/0-EB806.png"
        }
      ],
      "reference": {
        "messageId": "1554304676999200893",
        "channelId": "1554294587420319839",
        "guildId": "1361349522684510449"
      },
      "inlineEmojis": []
    },
    {
      "id": "1554754303107797074",
      "type": "Default",
      "timestamp": "2026-09-30T07:18:31.799+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Oh, are you using the same script for LVS extraction and PEX extraction? Maybe you want to divide those, or at least use different magic scripts.\n\nBTW, I think the flattening above does NOT propagate lower hierarchy text to the top, so there's no problem with local naming of nets (if I understand your comment).\n\nThese are the commands that I use for hierarchical extraction for LVS.\n```\ndrc off\ncrashbackups stop\ngds drccheck off\nundo disable\nlocking disable\ngds flatten yes # flattens cells with less than 10 shapes\ngds flatglob <cellname> # repeated for other larger cells to be flattened before extracting. Note: All subcells must be explicitly flattened too.\ngds read <gdsfile>\nload <cellname>\nselect top cell\nexpand\nextract no all ;# clear all flags\nextract do aliases\nextract do local\nextract unique\next2spice lvs\next2spice merge conservative ;# reduce parallel devices\next2spice short resistor ;# keep both ports but connect them with a 0 ohm resistor\next2spice -o <cellname>.gds.spice <cellname>.ext\nfeedback save <cellname>.feedback.txt\n```\n\nFun fact: magic's default extraction connects virtual nets by name - disjoint nets with the same label are extracted as connected. \nUse `extract unique` to automatically add a `_uq*` suffix to unconnected duplicate labels.",
      "author": {
        "id": "738396032295108721",
        "name": "bailey8889",
        "discriminator": "0000",
        "nickname": "bailey",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/0-EB806.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554762938353586217",
      "type": "Reply",
      "timestamp": "2026-09-30T07:52:50.602+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Oh I'm not doing LVS with this; this is for extraction of largs hard macros and entire dies into Xyce.",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [
        {
          "id": "738396032295108721",
          "name": "bailey8889",
          "discriminator": "0000",
          "nickname": "bailey",
          "color": null,
          "isBot": false,
          "roles": [],
          "avatarUrl": "2026-09_media/0-EB806.png"
        }
      ],
      "reference": {
        "messageId": "1554754303107797074",
        "channelId": "1554294587420319839",
        "guildId": "1361349522684510449"
      },
      "inlineEmojis": []
    },
    {
      "id": "1554763282085187645",
      "type": "Default",
      "timestamp": "2026-09-30T07:54:12.554+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "I.... did some stuff in KLayout macro/scripting to lift labels up to top level shapes while attaching path prefixes reflecting instance IDs.....",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554764018626076733",
      "type": "Default",
      "timestamp": "2026-09-30T07:57:08.159+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "I wonder if I maybe should do something to reduce shapes after the flattening on the KLayout side and before feeding it to magic?",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554767590340042905",
      "type": "Default",
      "timestamp": "2026-09-30T08:11:19.722+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Still not understanding the need to flatten in Klayout (unless you need those internal net names).\nCame across this command in magic that fractures layers into simple polygons. For example\n```\nM1   = input(13, 0)\nM1.data = M1.data.merged(true, 0).decompose_convex_to_region\nM1.output(13,  0)\n```",
      "author": {
        "id": "738396032295108721",
        "name": "bailey8889",
        "discriminator": "0000",
        "nickname": "bailey",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/0-EB806.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554770948232712224",
      "type": "Reply",
      "timestamp": "2026-09-30T08:24:40.306+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "those net names were requested by Tholin.",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [
        {
          "emoji": {
            "id": "",
            "name": "\uD83D\uDC4D",
            "code": "thumbsup",
            "isAnimated": false,
            "imageUrl": "2026-09_media/1f44d-27259.svg"
          },
          "count": 1,
          "users": [
            {
              "id": "738396032295108721",
              "name": "bailey8889",
              "discriminator": "0000",
              "nickname": "bailey",
              "color": null,
              "isBot": false,
              "avatarUrl": "2026-09_media/0-EB806.png"
            }
          ]
        }
      ],
      "mentions": [
        {
          "id": "738396032295108721",
          "name": "bailey8889",
          "discriminator": "0000",
          "nickname": "bailey",
          "color": null,
          "isBot": false,
          "roles": [],
          "avatarUrl": "2026-09_media/0-EB806.png"
        }
      ],
      "reference": {
        "messageId": "1554767590340042905",
        "channelId": "1554294587420319839",
        "guildId": "1361349522684510449"
      },
      "inlineEmojis": []
    },
    {
      "id": "1554770987721949197",
      "type": "Default",
      "timestamp": "2026-09-30T08:24:49.721+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "(for debugging purposes)",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554771879217074287",
      "type": "Default",
      "timestamp": "2026-09-30T08:28:22.27+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "I'd wish the PEX would manage to pick a fragment of RC-fractured net actually covered by the drawn label if it's an area label or where a mere point label happens to hit, when extracting; as I don't particularly care for the nuanced names of intermediate chunks of the RC lumped transmission/delay line \"model\" that'll extract, but we'll have to see I guess.....",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1554772004853518439",
      "type": "Default",
      "timestamp": "2026-09-30T08:28:52.224+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "not like LVS connectivity rules actually apply at PEX time \uD83D\uDE41",
      "author": {
        "id": "262706220073222144",
        "name": "namibj",
        "discriminator": "0000",
        "nickname": "namibj",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2026-09_media/f885abc0dddd0a33e4d4991b3c99091d-7ACD2.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": [
        {
          "id": "",
          "name": "\uD83D\uDE41",
          "code": "slight_frown",
          "isAnimated": false,
          "imageUrl": "2026-09_media/1f641-E1429.svg"
        }
      ]
    }
  ],
  "messageCount": 16
}